from rest_framework.pagination import PageNumberPagination


class MyPageNumberPagination(PageNumberPagination):
    # 设置url中的取多少页的key
    page_query_param = 'page'
    # 设置url中设置取数据条数的key
    page_size_query_param = 'pageSize'
    # 设置每一页的数据条数
    page_size = 10
    # 设置每一页最多可取的数据数
    max_page_size = 100